<script setup>
import { RouterView } from "vue-router"
import { onMounted } from "vue"
import BackgroundAnimation from "@/components/BackgroundAnimation.vue"
import LoadingVue from "@/components/LoadingVue.vue"
import PromptBox from "./components/PromptBox.vue"
import appStore from "@/stores"

onMounted(() => {
  appStore.homeviewStore.initTheme()
})
</script>

<template>
  <BackgroundAnimation />
  <PromptBox />
  <RouterView />
  <LoadingVue
    :visible="appStore.homeviewStore.pageLoading.visible"
    :loading="appStore.homeviewStore.pageLoading.loading"
    @animation-complete="appStore.homeviewStore.onPageLoadingComplete" />
</template>
